package LinkedBlockingQueue;

import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * Created by wangyg 
 * on 2017/7/6 15:16
 */
public class TestAdd {
/*	public static void main(String args[]){

		try {
			LinkedBlockingQueue<String> queue=new LinkedBlockingQueue(2);
			queue.add("hello");
			queue.add("world");
			queue.add("yes");
		} catch (Exception e) {
			System.out.println("异常了，信息为：/n/t");
			e.printStackTrace();
		}

	}*/

/*	public static void main(String args[]) {
		LinkedBlockingQueue<String> queue = new LinkedBlockingQueue<>(2);
		try {
			queue.put("hello");
			queue.put("world");
			queue.put("yes");

			System.out.println("yes");
		} catch (InterruptedException e) {
			e.printStackTrace();
		}


	}*/

	public static void main(String[] args) {
		final String[] s = { new String("123") };
		Timer timer=new Timer();
		timer.schedule(new TimerTask(){
			public void run(){
				s[0] =null;
			}
		},1,1);
		boolean equals = "".equals(s[0]);

		boolean b = null instanceof String;
		System.out.println(b);
	}

}
